<script>
export default {
  name: 'HomeView'
}
</script>

<template>
<el-container class="container">
  <el-header style="background-color: #545c64;border-bottom: 1px solid #fff">
    <el-row>
      <el-col :span="8">
        <h2 style="margin: 0;height: 60px;line-height: 60px;color: white">机蜂后台管理系统</h2>
      </el-col>
      <el-col :span="8" :offset="8" style="height:60px;display: flex;align-items: center;justify-content: right;padding-right: 20px">
        <el-dropdown trigger="click">
          <span style="color: white;cursor: pointer" class="el-dropdown-link">
            管理员<i class="el-icon-arrow-down el-icon--right"></i>
          </span>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item @click.native="console.log(123)" icon="el-icon-user">个人信息</el-dropdown-item>
            <el-dropdown-item icon="el-icon-edit">修改密码</el-dropdown-item>
            <el-dropdown-item divided icon="el-icon-switch-button">退出系统</el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
      </el-col>
    </el-row>
  </el-header>
  <el-container>
    <el-aside style="width: 200px;overflow: hidden;">
      <el-menu
        style="height: 100%;width: 100%;"
        :default-active="$route.path"
        router
        :default-openeds="['setting']"
        background-color="#545c64"
        text-color="#fff"
        active-text-color="#ffd04b">
        <el-submenu index="setting">
          <span slot="title">
            <i class="el-icon-setting"></i>
            <span>系统管理</span>
          </span>
          <el-menu-item-group>
            <span slot="title">用户模块</span>
            <el-menu-item index="/home/userinfo">用户管理</el-menu-item>
            <el-menu-item index="/home/role">角色管理</el-menu-item>
          </el-menu-item-group>
          <el-menu-item-group title="系统模块">
            <el-menu-item index="/home/banner">轮播管理</el-menu-item>
            <el-menu-item index="/home/enterprise">网站信息</el-menu-item>
          </el-menu-item-group>
        </el-submenu>
        <el-menu-item index="/home/project">
          <i class="el-icon-reading"></i>
          <span slot="title">课程管理</span>
        </el-menu-item>
        <el-menu-item index="/home/teacher">
          <i class="el-icon-medal-1"></i>
          <span slot="title">教师管理</span>
        </el-menu-item>
        <el-menu-item index="/home/school">
          <i class="el-icon-school"></i>
          <span slot="title">校区管理</span>
        </el-menu-item>
      </el-menu>
    </el-aside>
    <el-main>
      <router-view/>
    </el-main>
  </el-container>
</el-container>
</template>

<style scoped lang="scss">
.container{
  height: 100vh;
}
</style>
